

class Solution:
    def __init__(self):
        pass


    def roman(self,num):
        n = [1000,900,500,400,100,90,50,40,10,9,5,4,1]
        r = ['M','CM','D','CD','C','XC','L','XL','X','IX','V','IV','I']
        res = ""
        for i in range(len(n)):
            while num >= n[i]:
                res  += r[i]
                num -= n[i]
        return res

if __name__ == '__main__':
    S = Solution()
    res=S.roman(1234)
    print(res)






